﻿@{
    ViewBag.Title = "ChooseDate";
    Layout = "~/Views/Shared/_LayoutChild.cshtml";
}
@section head
{
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#Cycle").val('@ViewBag.Cycle');
            $("#Year").val('@ViewBag.CurYear');
            $("#Month").val('@ViewBag.CurMonth');
            $("#JD").val('@ViewBag.CurJD');
            $("#Year").width(180);
            $("#Month").width(180);
            $("#JD").width(180);

            switch ('@ViewBag.Cycle') {
                case "01": //月报
                    $("#03").hide();
                    break;
                case "02": //季报
                    $("#02").hide();
                    break;
                case "03": //年报
                    $("#02").hide();
                    $("#03").hide();
                    break;
                default:
            }
            $("input[name='Organization_Type']").click(function () {
                if ($(this).val() == "1") {
                    $("#NYSX").show();
                }
                else
                    $("#NYSX").hide();
            });

            $("input[name='Organization_Type']").each(function (i) {
                if (this.checked) {
                    if (this.value == "0") {
                        $("#NYSX").hide();
                    }
                    else
                        $("#NYSX").show();
                }
            });
        });
    </script>
}
<!--主窗体，页面都需要的div-->
<div class="ui-layout-center" style="overflow: hidden;">
    @using (Html.BeginForm("", "", FormMethod.Post, new Dictionary<string, object> { { "id", "formDetail" } }))
    {
        <br />
        @Html.Hidden("Cycle");
        <div id="01" class='b-col'>
            <div class="col-name">
                选择年份：</div>
            <div class="col-input">@Html.DropDownList("Year", new SelectList(ViewBag.ListYear, "Key", "Value"))</div>
        </div>
        <br />
        <div id="02" class='b-col' style="clear: both">
            <div class="col-name">
                选择月份：</div>
            <div class="col-input">@Html.DropDownList("Month", new SelectList(ViewBag.ListMonth, "Key", "Value"))</div>
        </div>
        <div id="03" class='b-col' style="clear: both">
            <div class="col-name">
                选择季度：</div>
            <div class="col-input">@Html.DropDownList("JD", new SelectList(ViewBag.ListJD, "Key", "Value"))</div>
        </div>
    }
</div>
